<?php
$selected_pro = isset($selected_pro) ? $selected_pro : 0;
$selected_pro_setting = array(
    'table_name' => 'pro',
    'key_field' => 'id',
    'value_field' => 'nom',
    'init_data' =>array('key'=>0,'name'=>'Public pour tous')
);
?>
<div id="wrapper-content">
    <table class="titrepage" width="100%">
        <tr>
            <td >Ajouter disponible</td>
            <td align="right"> </td>
        </tr>
    </table>
<?php echo form_open_multipart('fichiers/add_pro_dispo') ?>
    <table width="100%" class="list">
        <tr>
            <td width="30%" >Fichier</td>
            <td><input type="file" name="userfile" size="20"></td>
            <td><?php if(isset ($error)) echo $error; ?></td>
        </tr>
        <tr>
            <td width="30%" >nom</td>
            <td><input type="text" name="txtName" size="30" value="<?php echo set_value('txtName')?>"/></td>
            <td><?php echo form_error("txtName") ?></td>
        </tr>
       <tr>
                <td><label for="pro">Proffesionel</label></td>
                <td><?php echo form_dropdown('pro', dropdown_data($selected_pro_setting), $selected_pro) ?></td>
                <td></td>
            </tr>
        <tr>
            <td><input type="submit" value="Ajouter" name ="submit"/> </td>
        </tr>
    </table>

</div>
